/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package generics;

/**
 *
 * @author anh_yeu_em_nhieu_lam
 */
public class BoundGenericBasicTwo {
    public interface MyInterface{
        public int add(int a,int b);
    }
    public class MyClass implements MyInterface{
        public int add(int a, int b) {
            return a+b;
        }        
    }
    public <U extends MyInterface> void Inramanhinh(U a){
        System.out.print(a.add(10, 20));
    }
    public static void main(String[] args){
        new BoundGenericBasicTwo().Inramanhinh(new BoundGenericBasicTwo().new MyClass());
    }
}
/*
30
 * */